# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libvorbis
pkgver=1.3.7
pkgrel=0
pkgdesc="Vorbis codec library"
url="https://xiph.org/vorbis"
arch="all"
license="BSD-3-Clause"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
makedepends="libogg-dev"
source="https://downloads.xiph.org/releases/vorbis/libvorbis-$pkgver.tar.xz"

# secfixes:
#   1.3.6-r2:
#     - CVE-2018-10393
#   1.3.6-r1:
#     - CVE-2018-10392
#   1.3.6-r0:
#     - CVE-2018-5146
#   1.3.5-r4:
#     - CVE-2017-14632
#     - CVE-2017-14633
#   1.3.5-r3:
#     - CVE-2017-14160

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make -j1 check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="bbf5f11f623d959b3ba98d6b52806521b0b918b59b867f0658c153ea1013293364eead4987e9e71f8798021379310860a2e548fcf89d10caf23d45e41aba45cd  libvorbis-1.3.7.tar.xz"
